package com.ruoyi.yipaiju.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yipaiju.mapper.ValueAddedSigningorderMapper;
import com.ruoyi.yipaiju.domain.ValueAddedSigningorder;
import com.ruoyi.yipaiju.service.IValueAddedSigningorderService;

/**
 * fo_value_added_signingorderService业务层处理
 * 
 * @author liuwp
 * @date 2023-03-01
 */
@Service
public class ValueAddedSigningorderServiceImpl implements IValueAddedSigningorderService 
{
    @Autowired
    private ValueAddedSigningorderMapper valueAddedSigningorderMapper;

    /**
     * 查询fo_value_added_signingorder
     * 
     * @param id fo_value_added_signingorder主键
     * @return fo_value_added_signingorder
     */
    @Override
    public ValueAddedSigningorder selectValueAddedSigningorderById(Long id)
    {
        return valueAddedSigningorderMapper.selectValueAddedSigningorderById(id);
    }

    /**
     * 查询fo_value_added_signingorder列表
     * 
     * @param valueAddedSigningorder fo_value_added_signingorder
     * @return fo_value_added_signingorder
     */
    @Override
    public List<ValueAddedSigningorder> selectValueAddedSigningorderList(ValueAddedSigningorder valueAddedSigningorder)
    {
        return valueAddedSigningorderMapper.selectValueAddedSigningorderList(valueAddedSigningorder);
    }

    /**
     * 根据业务主键查询一条记录：fo_value_added_signingorder
     *
     * @param valueAddedSigningorder fo_value_added_signingorder
     * @return fo_value_added_signingorder
     */
    @Override
    public ValueAddedSigningorder selectOneValueAddedSigningorder(ValueAddedSigningorder valueAddedSigningorder)
    {
        return valueAddedSigningorderMapper.selectOneValueAddedSigningorder(valueAddedSigningorder);
    }

    /**
     * 新增fo_value_added_signingorder
     * 
     * @param valueAddedSigningorder fo_value_added_signingorder
     * @return 结果
     */
    @Override
    public int insertValueAddedSigningorder(ValueAddedSigningorder valueAddedSigningorder)
    {
        valueAddedSigningorder.setCreateTime(DateUtils.getNowDate());
        return valueAddedSigningorderMapper.insertValueAddedSigningorder(valueAddedSigningorder);
    }

    /**
     * 修改fo_value_added_signingorder
     * 
     * @param valueAddedSigningorder fo_value_added_signingorder
     * @return 结果
     */
    @Override
    public int updateValueAddedSigningorder(ValueAddedSigningorder valueAddedSigningorder)
    {
        valueAddedSigningorder.setUpdateTime(DateUtils.getNowDate());
        return valueAddedSigningorderMapper.updateValueAddedSigningorder(valueAddedSigningorder);
    }

    @Override
    public int updateValueAddedSigningorderCondition(ValueAddedSigningorder valueAddedSigningorder, ValueAddedSigningorder valueAddedSigningorderCondition)
    {
                valueAddedSigningorder.setUpdateTime(DateUtils.getNowDate());
        return valueAddedSigningorderMapper.updateValueAddedSigningorderCondition(valueAddedSigningorder, valueAddedSigningorderCondition);
    }

    /**
     * 批量删除fo_value_added_signingorder
     * 
     * @param ids 需要删除的fo_value_added_signingorder主键
     * @return 结果
     */
    @Override
    public int deleteValueAddedSigningorderByIds(Long[] ids)
    {
        return valueAddedSigningorderMapper.deleteValueAddedSigningorderByIds(ids);
    }

    /**
     * 删除fo_value_added_signingorder信息
     * 
     * @param id fo_value_added_signingorder主键
     * @return 结果
     */
    @Override
    public int deleteValueAddedSigningorderById(Long id)
    {
        return valueAddedSigningorderMapper.deleteValueAddedSigningorderById(id);
    }

    /**
     * 条件删除fo_value_added_signingorder
     *
     * @param valueAddedSigningorder fo_value_added_signingorder
     * @return 结果
     */
    @Override
    public int deleteValueAddedSigningorderByCondition(ValueAddedSigningorder valueAddedSigningorder)
    {
        return valueAddedSigningorderMapper.deleteValueAddedSigningorderByCondition(valueAddedSigningorder);
    }

}
